package pokerantani.v2.linematchers;

import java.util.regex.Pattern;

import pokerantani.v2.LineMatcher;
import pokerantani.v2.RE;


public class PostBlind extends LineMatcher {
	static final Pattern pPostBlind_PS = Pattern.compile("(" + RE.PLAYER + "): posts (small|big) blind \\$?(" + RE.FLOAT + ")");
	static final Pattern pPostBlind_FTP = Pattern.compile("(" + RE.PLAYER + ") posts the (small|big) blind of \\$?(" + RE.FLOAT + ")");
	
	public String playerName;
	public boolean small;
	public float amount;
	
	public boolean match(String line) {
		if(match(line, pPostBlind_PS) || match(line, pPostBlind_FTP)) {
			playerName = group(1);
			small = group(2).equals("small");
			amount = groupFloat(3);
			return true;
		}
		return false;
	}
}
